package jp.sourceforge.akjrcp.akj_betas;

import jp.sourceforge.akjrcp.flvtools.basic.Perspective;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.part.IntroPart;

public class Akj_betasIntro extends IntroPart{
	IntroPart part=this;
	public void createPartControl(Composite parent) {
		for(int i=0;i<3;i++){
		Button bt=new Button(parent,SWT.NULL);
		bt.setText("intro");
		bt.addSelectionListener(new SelectionAdapter(){
			public void widgetSelected(SelectionEvent e) {
				try {
					//part.getIntroSite().getPage().setEditorAreaVisible(false);
					IWorkbenchPage w=PlatformUI.getWorkbench().showPerspective(Perspective.ID,PlatformUI.getWorkbench().getActiveWorkbenchWindow());
					PlatformUI.getWorkbench().getIntroManager().closeIntro(part);
					
					//w.bringToTop();
					//w.set
					//PlatformUI.getWorkbench().getActiveWorkbenchWindow().(Perspective.ID,getIntroSite());
				} catch (WorkbenchException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}
			}

		});
		}
	}

	public void setFocus() {
		// TODO Auto-generated method stub
		
	}

	public void standbyStateChanged(boolean standby) {
		// TODO Auto-generated method stub
		
	}



}
